package asteroids.model.programs.expression;

import java.util.ArrayList;

import asteroids.model.programs.type.*;

public class BooleanExpression extends E {
	
	private Bool value;
	
	public BooleanExpression(int line, int column) {
		super(line, column);
		value = null;
	}
	
	public BooleanExpression(int line, int column, boolean b){
		this(line, column);
		value = new Bool(b);
	}
	
	public Bool getValue(){
		return value;
	}

	public boolean compareTo(BooleanExpression be){
		return be.getValue().getValue() == getValue().getValue();
	}
	
	public void setValue(T type){
		if(type instanceof Bool)
			value = (Bool) type;
	}
	
	public void print(){
		System.out.println(value);
	}

	@Override
	public ArrayList<VariableExpression> getVariables() {
		return new ArrayList<VariableExpression>();
	}
	
	@Override
	public String typecheck(){
		return "";
	}
}
